<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
		<title>登录</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="Expires" content="-1" />
		<link rel="stylesheet" href="sheet.css" type="text/css" />
		<script type="text/javascript" src="jquery.js"></script>

		<script type="text/javascript">
			$(function() {
				$("#login").click(function(){
					$.post("login.asp",{usr:$("#usr").val(),pass:$("#pass").val()}, function(data){
						if(data.login){
							window.location.href="index.htm";
						}else{
							$("#error").html("登录错误！");
						}
					},"json");
				});
			});
		</script>
</head>
<body>
		<div id="login_bar">
				<label>用户名</label>
				<input id="usr" name="usr" type="text" />
				<br/>
				<label>密码</label>
				<input id="pass" name="pass" type="password" />
				<button id="login" name="login" type="button">登录</button>
				<div id="error"></div>
		</div>
</body>
</html>